<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class UploadFile</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class UploadFile</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">文件上传类</p>
	<ul class="tags">
				<li><span class="field">author:</span> liu21st &lt;<a href="mailto:liu21st@gmail.com">liu21st@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> $Id$</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_ORG---Net---UploadFile.class.php.html">/ORG/Net/UploadFile.class.php</a> (line <span class="field">24</span>)
		</p>
		
				
		<pre><a href="../../Think/Core/Base.html">Base</a>
   |
   --UploadFile</pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																																																																								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$allowExts" title="details" class="var-name">$allowExts</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$allowTypes" title="details" class="var-name">$allowTypes</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$hashType" title="details" class="var-name">$hashType</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$maxSize" title="details" class="var-name">$maxSize</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$savePath" title="details" class="var-name">$savePath</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$saveRule" title="details" class="var-name">$saveRule</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$supportMulti" title="details" class="var-name">$supportMulti</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$thumb" title="details" class="var-name">$thumb</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$thumbMaxHeight" title="details" class="var-name">$thumbMaxHeight</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$thumbMaxWidth" title="details" class="var-name">$thumbMaxWidth</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$thumbSuffix" title="details" class="var-name">$thumbSuffix</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$uploadReplace" title="details" class="var-name">$uploadReplace</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$zipImages" title="details" class="var-name">$zipImages</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																						
				<div class="method-definition">
											<span class="method-result">UploadFile</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$maxSize</span> = <span class="var-default">''</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$allowExts</span> = <span class="var-default">''</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$allowTypes</span> = <span class="var-default">''</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$savePath</span> = <span class="var-default">UPLOAD_PATH</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$saveRule</span> = <span class="var-default">''</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#error" title="details" class="method-name">error</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$errorNo</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getErrorMsg" title="details" class="method-name">getErrorMsg</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getUploadFileInfo" title="details" class="method-name">getUploadFileInfo</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#upload" title="details" class="method-name">upload</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$savePath</span> = <span class="var-default">''</span>])
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$allowExts" id="$allowExts"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$allowExts</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">35</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$allowTypes" id="$allowTypes"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$allowTypes</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">39</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$hashType" id="$hashType"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$hashType</span>
			 = <span class="var-default"> 'md5_file'</span>			(line <span class="line-number">65</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$maxSize" id="$maxSize"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$maxSize</span>
			 = <span class="var-default"> -1</span>			(line <span class="line-number">28</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$savePath" id="$savePath"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$savePath</span>
			 = <span class="var-default"> ''</span>			(line <span class="line-number">53</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$saveRule" id="$saveRule"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$saveRule</span>
			 = <span class="var-default"> ''</span>			(line <span class="line-number">61</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$supportMulti" id="$supportMulti"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$supportMulti</span>
			 = <span class="var-default"> true</span>			(line <span class="line-number">31</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$thumb" id="$thumb"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$thumb</span>
			 = <span class="var-default">  false</span>			(line <span class="line-number">42</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$thumbMaxHeight" id="$thumbMaxHeight"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$thumbMaxHeight</span>
						(line <span class="line-number">46</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$thumbMaxWidth" id="$thumbMaxWidth"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$thumbMaxWidth</span>
						(line <span class="line-number">44</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$thumbSuffix" id="$thumbSuffix"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$thumbSuffix</span>
			 = <span class="var-default">  '_thumb'</span>			(line <span class="line-number">48</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$uploadReplace" id="$uploadReplace"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$uploadReplace</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">56</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$zipImages" id="$zipImages"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$zipImages</span>
			 = <span class="var-default"> false</span>			(line <span class="line-number">50</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">80</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">架构函数</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">UploadFile</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$maxSize</span> = <span class="var-default">''</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$allowExts</span> = <span class="var-default">''</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$allowTypes</span> = <span class="var-default">''</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$savePath</span> = <span class="var-default">UPLOAD_PATH</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$saveRule</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$maxSize</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$allowExts</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$allowTypes</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$savePath</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$saveRule</span>			</li>
				</ul>
		
			
	</div>
<a name="methoderror" id="error"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">error</span> (line <span class="line-number">298</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">获取错误代码信息</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			error
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$errorNo</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$errorNo</span><span class="var-description">: 错误号码</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetErrorMsg" id="getErrorMsg"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getErrorMsg</span> (line <span class="line-number">464</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得最后一次错误信息</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getErrorMsg
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetUploadFileInfo" id="getUploadFileInfo"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getUploadFileInfo</span> (line <span class="line-number">450</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得上传文件的信息</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getUploadFileInfo
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodupload" id="upload"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">upload</span> (line <span class="line-number">167</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">上传文件</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			upload
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$savePath</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$savePath</span><span class="var-description">: 上传文件保存路径</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 27 Mar 2008 08:21:00 +0000 by 塞北的雪
	</p>
	</div></body>
</html>